package edu.tum.cs.i1.pse;

import java.io.IOException;
import java.io.InputStream;
import java.net.URL;

/**
 * @author arj
 * The connector can be used to connect to a URL resource.
 */
public interface ConnectorInterface {
	
	
	/** Gets a stream containing the resource at the given location.
	 * @param url The resource location
	 * @return The stream containing the data located at the location.
	 */
	public InputStream open(URL url);
	
	/** Closes the stream
	 * @param stream The stream to be closed.
	 * @throws IOException If the underlying stream fails an exception is thrown.
	 */
	public void close(InputStream stream) throws IOException;

}
